GENERAL Q&A





Q. VOT:1 Checking out objects with NOLOCK A. If objects are checked out from a group database into a personal database with NOLOCK, the checked-out is created in the personal database with a new LOID.
Q. VOT:2 vcopydb to duplicate a database A. vcopydb requires the dba of the source db to be the same as the target db. To allow a user who does not own the database to copy it would cause the security scheme provided by VERSANT to break.
Q. VOT:3 Improving performance for selects A. vstats provides hit ratio for the BackEnd cache. If the hit ratio for the BackEnd cache is not very high, increasing the max_page_buffs in the backend profile should increase the performance.
Q. VOT:4 Lock modes supported by Versant ODBMS A) Versant supports four short lock modes: read lock (RLOCK), update lock (ULOCK), write lock (WLOCK), and no lock (NLOCK). Versant provides object level locking and the locks can be aquired implicitly and explicitly When the user begins a session on a Versant database, a default lock read lock is set. This implicit lock is placed on any object obtained by dereferencing a "link", or casts a "link" to a pointer. Deleting an object places an implicit WLOCK on the object. The user has the ability to modify the default lock mode as well as to acquire a lock mode on an object explictly. dom->set_default_lock(lockmode) //sets the default lock mode aObject->acquireslock(lockmode) //explicitly sets the lock mode
Q. VOT:5 Installing different versions of Versant on same machine A: Versant does not recommend installing different versions of Versant on the same machine. If the user is compelled to install different versions of Versant on the same machine, the steps are outlined below Assume: You wish to install 3.0.14 and 4.0.7 on Solaris 2.4 machine The database and applications will run on the same machine. Versant 3.0.14 is installed at /usr/local/versant3/3.0.14 Versant 4.0.7 is installed at /usr/local/versant4/4.0.7 Step 1: Install 4.0.7 by following the installation documentation The oscssd entry in /etc/inetd.conf should point to 4.0.7/sun4/bin/ss.d. Step 2: Change the environment variables that will be used by the applications that run on this machine. Assume the combinations of applications and databases. 1. Application: 3.0.14 Database: 3.0.14 VERSANT_ROOT@localhost = /usr/local/versant3 VERSANT_REL@localhost = 3.0.14 Always qualify the database names as dbname@localhost. 2. Application: 3.0.14 Database: 4.0.7 No special environment variables are necessary. Please note: The 3.0.14 applications have to be linked with the two-process Versant library (liboscfe). 3. Application: 4.0.7 Database: 4.0.7 No special environment variables are necessary.
Q. VOT:6 Distributing logs and system volumes of different disks A. Distributing the logical.log, physical.log, and system to different directories can be achieved by modifying the paths of the files in profile.be. Make sure the directories specified have access permissions. If startdb gets an error "Unable to open volume", it means that the permissions were denied to one of the directories specified in profile.be.
Q. VOT:7 Backing up and restoring databases on different machines A. Create a databese with the same name and database id number. Do a restore to restore the database. If there are additional volumes for the database, the absolute path is required. The best approach is to create symbolic links to simulate the path.
Q. VOT:8 Createdb fails by starting numerous obe's A. The name set for VERSANT_DBID_NODE does not match the actual name of the server where the database is being created. Type in hostname at the command prompt to see the name of the machine and change the VERSANT_DBID_NODE setting on the server to this name. Note: 1. On OS/2, check the TCP/IP configuration notebook for the name of the machine as the hostname utility returns the name in lower case even though the name configured may be in mixed case.
Q. VOT:9 Error SM_E_DEVREADERROR ( VERSANT error 2751 ) A: This error is thrown as a result of a UNIX read system call failing. VERSANT expects a certain no. of bytes to be read in and does not get back the expected number. Possible cause: Corrupted disk sector.
Q. VOT:10 Error SM_E_NOFREEBUFFERS (VERSANT error 2713 ) A: This error could be due to several reasons: 1. an object requires more pages in the SDA buffer cache than is available. 2. an object requires more contiguous space from the SDA memory manager than is available and there isn't enough swap space to add the requested new shared memory segments. Solution for both scenario would be to increase max_page_buffs in profile.be. The choice of the appropriate value for max_page_buffs depends on the application. With 128M RAM, I would at least use up 32M for the buffer cache (max_page_buffs = 2048). Turning commit_flush on or increasing the commit frequency will not help in this situation. See also page 8-7 of "Concepts and Usage Manual" and page 2-18 of "System Manual" for release 4.
Q. VOT:11 Error LOCK_WAIT_TIMEOUT (VERSANT error 2903 ) A: If an application is browsing the database with a RLOCK and another application has its default lock mode to ULOCK. If the application with the ULOCK deferences objects, Versant will place a ULOCK on the objects it deferences implicitly. In this case, the application holding objects with RLOCK will block the user with ULOCK and application will throw a Error 2903. The Versant Browser places RLOCK's on objects as its default. Another example of implicit locking is marking an object as dirty automatically obtains a write lock on the object. If you change the default lock to RLOCK, then the application should not encounter lock wait timeout error while dereferencing objects that the browser is accessing. To determine the current default lock, use get_default_lock(); to change the default lock, use set_default_lock().
Q. VOT:12 How does Versant handle schema evolution ? As applications evolve and new versions of software need to be installed in deployed applications, database schemas have a need to be evolved. Versant provides "on-line" schema evolution. At no time the database needs to be stopped for schema evolution to take place. Versant provides "lazy" schema evolution which allows for the database to be running in a 24x7 environment. When the schema is evolved, the class object is evolved and not the instances. As the instances of the evolved class are accessed, the instances are evolved.
Q. VOT:13 Guidelines for using raw devices A. The size of the system volume must be large enough to store all objects and classes expected to reside in the database at any time. A guideline for setting the size of sysvol is guideline = min_size + (1.25 * (avg_o_size + 40) * num_objects ) The min_size = 1800K avg_o_size = avg size in bytes of objects in the database. num_objects = no of objects. You may specify raw device for the system vol. The size of the log depends upon the no of transactions. The guideline to follow is plogvol guideline = 2 * (max_o_size + 1K) + 32K subsitute the size of the largest object in the database for max_o_size. llogvol guideline = 32k + (2 * (max_o + 100)) * num_o_per_tr * num_tr substitute max_o = size in bytes of the largest object in the database. num_o_per_tr = largest no of objects involved in the transaction. num_tr = max no of concurrent transactions.
Q. VOT:14 Invocation of obe's in Windows/NT A. VERSANT uses the Windows NT service mechanism to spawn obe's. The installation script on Windows/NT installs a NT service called VERSANTD and the executable that acts as the service provider is called winverd.exe. The first time the service is started, it starts a process by running an executable called versantd.exe The versantd process listens for traffic on the VERSANT related port (identified by name oscssd) When there is traffic on this port, inetd invokes the VERSANT daemon ss.exe which in turn invokes the actual VERSANT server process called obe. (5019 can be changed to a different number).
Q. VOT:15 Starting and stopping the VERSANTD process on Windows/NT 1. Go over to the control panel and select the services icon. If installed, VERSANTD should listed in the list of services. The type of startup should be Automatic. Press start to start the service if not started already. 2. Use "net start versantd" to start the service from the NT command prompt. If the service is not installed already, one can install it by typing in instsrv versantd \winverd.exe where = c:\versant\4_0_7\nt\bin if VERSANT is installed in c:\versant and the VERSANT release is 4.0.7. The service can be started in either of the 2 ways shown above. To stop the VERSANTD process from the control panel, select the services icon and use the stop button after selecting the versantd service from the list of services displayed. Another way to stop the service is by using "net stop versantd" from the NT command prompt.
Q. VOT:16 Restrictions in Release 4.0.x for VERSANT on Windows/NT A. Long file names with spaces are not supported for the VERSANT release directory and database directories. Long user names with spaces are not supported. SYSTEM cannot be a valid user of a VERSANT database.
Q. VOT:17 Possible cause for VERSANTD not starting on Windows/NT A The executable winverd.exe needs to know the location of the versantd.exe executable on the system as it needs to execute this program as part of service startup. The location is established by a config. file with name vrxxyyzz.ini where xx=04, yy=00, zz=05 for Release 4.0.5 and xx = 03, yy=00,zz=14 for Release 3.0.14. This file should be located in the Windows NT home directory ( usually c:\winnt35). The file contains one line: VERSANT_ROOT where VALUE_OF_VERSANT_ROOT = c:\versant if VERSANT is installed in c:\versant. If this file is not found, VERSANTD will not start as VERSANT_ROOT is not known
Q. VOT:18 Duplicating databases A There are many different ways of duplicating databases. The first procedure is to make an identical copy of the database, that is the LOIDs in the two databases are the same. There are two ways to accomplish this. The first is to use vcopydb utility. This copies the contents of db1 into db2. vcopydb assumes db2 has not been created and makes a duplicate of the database. The second mechanism is to write a program that selects all the object in the database and then does a dom->migrateobj(selected_objects,primary_db,copy_to_db,O_MVSYNC). One of the advantages of using the migrateobj is that is allows the user to copy only certain classes, or even only certain instances. The next copy database is for users that do not care about the LOIDs and want to copy the database logically. Versant provides a utility vexport that creates an ASCII dump of the database. Versant provides a utility, vimport that takes the ASCII file and create logical copies in a database. Please see 3-40 and 3-45 for usage of vexport and vimport.
Q. VOT:19 Collections in Versant A All of Versants collections are logical collections. When an object is removed from the collection, the object is removed from the collection, but not from the database. It is the responsibility of the application programmer to delete the physical object from the collection if they want the behavior of a physical collection

[ What's New | Products | Partners | Tech Support | About Us | Employment | Contact Us | Search | Home ]
[ C++ Solutions | SmallTalk Solutions | Internet Solutions ]

©1996 Versant Object Technology
1380 Willow Road
Menlo Park, CA 94025
USA

1-800-VERSANT
Tel 415-329-7500
Fax 415-325-2380
e-mail info@versant.com